import request from "@/utils/request";

// 查询出库任务列表
export function listDistribution(query) {
  return request({
    url: "/system/distribution/list",
    method: "get",
    params: query,
  });
}

// 查询出库任务详细
export function getDistribution(distributionId) {
  return request({
    url: "/system/distribution/" + distributionId,
    method: "get",
  });
}

// 新增出库任务
export function addDistribution(data) {
  return request({
    url: "/system/distribution",
    method: "post",
    data: data,
  });
}

// 修改出库任务
export function updateDistribution(data) {
  return request({
    url: "/system/distribution",
    method: "put",
    data: data,
  });
}

// 删除出库任务
export function delDistribution(distributionId) {
  return request({
    url: "/system/distribution/" + distributionId,
    method: "delete",
  });
}

// 出库
export function goOut(data) {
  return request({
    url: "/system/distribution/goOut",
    method: "post",
    data: data,
  });
}
